#include <iostream>
#include <string>
#include <vector>
#include <cmath>
using namespace std;
typedef unsigned long long ull;
vector<int> su, cn, ve;
bool isSu(ull n){
    if (n < 2)
        return false;
    int k = sqrt(n);
    for (int i = 2; i <= k; i++)
        if (n % i == 0)
            return false;
    return true;
}
void fun(int n){
    bool flag;
    int m = su.size();
    for (int i = 0; i < m; i++){
        flag = false;
        for (int j = 0; j < n; j++)
            if (ve[j] % su[i] == 0){
                ve[j] =ve[j]/su[i];
                flag = true;
            }
        if (flag){
            cn[i]++;
            i--;
        }
    }
}
string cp(string str, ull k){
    ull s, r = 0;
    int n = str.size();
    for (int i = n - 1; i >= 0; i--){
        s = (str[i] - '0') * k + r;
        str[i] = s % 10 + '0';
        r = s / 10;
    }
    while (r){
        str.insert(str.begin(), r % 10 + '0');
        r /= 10;
    }
    return str;
}
int main(){
    ull x;
    cin >> x;
    for (ull i = 2; i <= x; i++)
        if (isSu(i)){
            su.push_back(i);
            cn.push_back(0);
        }
    for (int i = 1; i <= x; i++)
        ve.push_back(i);
    fun(x);
    string str = "1";
    for (int i = 0; i < su.size(); i++)
        if (cn[i] > 0){
            str = cp(str, su[i]);
            cn[i--]--;
        }
    cout << str << endl;
    return 0;
}